package com.hkts.naturalgasauthentication.management.controller;

import com.hkts.management.common.utils.Result;
import com.hkts.management.common.utils.ResultUtil;
import com.hkts.naturalgasauthentication.base.controller.ManagementBaseController;
import com.hkts.naturalgasauthentication.base.service.ManagementBaseService;
import com.hkts.naturalgasauthentication.management.entity.WebsiteParams;
import com.hkts.naturalgasauthentication.management.service.WebsiteParamsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @ClassNameWebsiteIParamtersController
 * @Description
 * @Author yck
 * @Date2021-02-19 15:04
 * @Version V1.0
 **/
@Controller
@RequestMapping("/authentication/websiteParamters")
public class WebsiteIParamtersController extends ManagementBaseController<WebsiteParams,String> {
    @Autowired
    private WebsiteParamsService websiteParamsService;
    @Override
    public ManagementBaseService getService() {
        return websiteParamsService;
    }

    /*
    * 根据网站获取参数
    * */
    @ResponseBody
    @GetMapping("/list")
    public Result list(WebsiteParams websiteParams){
     List<WebsiteParams> list= websiteParamsService.findByCondition(websiteParams);
     return ResultUtil.data(list);
    }

}
